<template>
	<view class="mainpadding2">
		<view class="tab_nav">
			<view class="navTitle" v-for="(item,index) in navList" :key="index">
				<view :class="{'active':isActive === index}" @click="checked(index)">
					{{item.title}}
				</view>
			</view>
		</view>
		<view class="margin_top flexbetween" v-for="item in 5">
			<view class="flexleft" style="width: 73%;">
				<image class="touxiang margin_right2" src="../static/image/system/vs.png" mode=""></image>
				<view class="">
					<view class="sanshier fonweight">耳朵玥 </view>
					<view class="yhxk xiaohui strongtext margin_top1">定期更新！进来的记得点个关...</view>
				</view>
			</view>
			<!-- <view class="dhbtn">已关注</view> -->
			<!-- <view class="dhbtn">互相关注</view> -->
			<view class="dlbtn">关注</view>
			<!-- <view class="dlbtn">回关</view> -->
		</view>
	</view>
</template>

<script>
	export default {
		data() {
			return {
				isActive: 0,
				navList: [{
					index: 0,
					title: '关注246'
				}, {
					index: 1,
					title: "粉丝593.5w"
				}],
				type: "",
				text: "",
			}
		},
		onLoad(options) {
			this.type = options.id
			let text = ""
			if (this.type == 0) {
				this.text = "关注"
			} else if (this.type == 1) {
				this.text = "粉丝"
			}
			uni.setNavigationBarTitle({
				title: this.text
			});
		},
		methods: {
			checked(index) {
				this.isActive = index
			},
		}
	}
</script>

<style lang="scss" scoped>
	.dlbtn {
		background: #2361FF;
		border-radius: 44rpx;
		padding: 16rpx 40rpx;
		color: #fff;
		font-size: 24rpx;
	}

	.dhbtn {
		background: #F5F5F5;
		border-radius: 44rpx;
		padding: 16rpx 40rpx;
	}

	.touxiang {
		width: 100rpx;
		height: 100rpx;
		border-radius: 50%;
	}

	.tab_nav {
		background-color: #fff;
		display: flex;
		justify-content: center;
		align-items: center;
		padding-bottom: 11rpx;
	}

	.tab_nav .navTitle {
		height: 90rpx;
		line-height: 90rpx;
		width: 100%;
		text-align: center;
		font-size: 30rpx;
		font-weight: bold;
		color: #999999;
	}

	.active {
		font-size: 30rpx;
		color: #333333;
		font-weight: bold;
		position: relative;
	}

	.active::after {
		content: "";
		position: absolute;
		width: 36rpx;
		height: 6rpx;
		background: #2361FF;
		border-radius: 3rpx;
		background-size: 100% 100%;
		left: 0rpx;
		right: 0rpx;
		bottom: 0rpx;
		margin: auto;
	}
</style>